#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>


void function(FILE *fp, int * i, int *NumberOfWords, int *NumberOfStrings){
	int ch;

	

	while((ch = getc(fp))!=EOF){
		(*i)++;
		if (isspace(ch) != 0) {
			(*NumberOfWords)++;
		}
		if(ch =='\n'){
				(*NumberOfStrings)++;
		}
	}
	
	
	
}
int main(int argc, char *argv[]){
	FILE *fp;
	int i = 0;
	int NumberOfWords = 1;
	int NumberOfStrings = 0;
	
	if ((fp = fopen(argv[1],"r"))==NULL) {
		printf("Error1.\n");
		return 1;
	}
	function(fp, &i,&NumberOfWords, &NumberOfStrings);
	printf("Number of signs ");
	printf("%d\n", i);
	printf("Number of words ");
	printf("%d\n", NumberOfWords);
	printf("Number of strings ");
	printf("%d\n", NumberOfStrings);
	
	fclose(fp);
	return 0;
}